const fs = require('fs')


exports.getMime = function (extname) {
  fs.readFile(`./mime.json`, (err, data) => {
    if (err) {
      console.log(`mime.json文件不存在`)
      return false
    }

    let mimes = JSON.parse(data.toString())
    return mimes[extname] || 'text/html'
  })
}